package com.app.system.common;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wcf-pc on 2018/12/24.
 */
@RestController
public class MailController {

//    @Autowired
//    private JavaMailSender jms;

    @RequestMapping(value = "/send")
    public String send() {
//        //建立邮件消息
//        SimpleMailMessage mainMessage = new SimpleMailMessage();
//        //发送者
//        mainMessage.setFrom("xxxxx@126.com");
//        //接收者
//        mainMessage.setTo("xxxx@qq.com");
//        //发送的标题
//        mainMessage.setSubject("嗨喽");
//        //发送的内容
//        mainMessage.setText("hello world");
//        jms.send(mainMessage);
        return "ok";
    }


}
